/**
 * 
 */
package hu.gbalage.owlforms.api.data;

import java.net.URI;

/**
 * Contains a typed constant, which was inserted into a field
 * @author Grill Balazs (balage.g@gmail.com)
 *
 */
public interface FieldValue {

	/**
	 * @return the type of the value
	 */
	public URI getType();
	
	/**
	 * @return true if this value is a primitive type value
	 */
	public boolean isPrimitive();
	
	/**
	 * Return self as composite value if this is a value of a complex field, returns null
	 * otherwise
	 * @return
	 */
	public CompositeValue asCompositeValue();
	
	/**
	 * Returns self as primitive value if this is a value of a primitive field,
	 * returns null otherwise
	 * @return
	 */
	public PrimitiveValue asPrimitiveValue();
	
}
